package jp.dev7.enchant.tot.controller.test;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import com.google.appengine.api.channel.ChannelMessage;
import com.google.appengine.api.channel.ChannelService;
import com.google.appengine.api.channel.ChannelServiceFactory;

public class ChannelTestPostController extends Controller {

    private ChannelService channelService = ChannelServiceFactory
        .getChannelService();

    @Override
    public Navigation run() throws Exception {
        ChannelMessage msg =
            new ChannelMessage(asString("to"), asString("message"));
        channelService.sendMessage(msg);
        return null;
    }
}
